//
//  ContentViewController.swift
//  PageNavigator_Example
//
//  Created by 张奇 on 2025/8/13.
//  Copyright © 2025 CocoaPods. All rights reserved.
//

import UIKit

class ContentViewController: UIViewController {
    
    var label: UILabel!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        let label = UILabel()
        
        label.text = self.title
        self.view.addSubview(label)
        label.snp.makeConstraints { make in
            make.center.equalTo(self.view)
            make.width.equalTo(self.view)
            make.height.equalTo(self.view)
        }
        self.label = label;
    }
    
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        print("对象：\(self)method 被执行：\(#function)--\(animated)")
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        print("对象：\(self)method 被执行：\(#function)--\(animated)")
    }
    

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        print("对象：\(self)method 被执行：\(#function)--\(animated)")
    }
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        print("对象：\(self)method 被执行：\(#function)--\(animated)")
    }
    
    override func didMove(toParentViewController parent: UIViewController?) {
        super.didMove(toParentViewController: parent)
        print("对象：\(self)method 被执行：\(#function)--\(parent)")
    }

    override func willMove(toParentViewController parent: UIViewController?) {
        super.willMove(toParentViewController: parent)
        print("对象：\(self)method 被执行：\(#function)--\(parent)")
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
